The invention is directed to an apparatus, methods, and article for generating a display in a non-redundant manner so as to decrease memory space and time required by a computing device to generate the display.
There are numerous instances in which overlapping rectangular objects occur in computer-generated displays. For example, in browser displays, it is common to see frames including menus, the tool bars, and controls for the browser, within which is displayed another rectangular object for the hypertext mark-up language (HTML) or extensible mark-up language (XML) document displayed within the browser. Word processing programs typically generate displays with similar frames bounding a software xe2x80x9cclip-boardxe2x80x9d for displaying a rectangular portion of a document page. As another example, many application or server programs generate rectangular menu or dialog boxes including rectangular control objects within a larger rectangular objects. For example a rectangular dialog box may be overlapped by rectangular buttons such as xe2x80x9csubmitxe2x80x9d or xe2x80x9ccancelxe2x80x9d. As yet another example, in some computer game programs and computer graphics programs, a scene object can be overlapped by other rectangular objects. In the Microsoft Windows(copyright) or MacIntosh(copyright) operating system environments, overlapping windows or other rectangular objects are commonplace.
To generate a display of overlapping objects, an application program is typically pre-programmed with a hierarchy of levels for the display of objects. For example, if a dialog box has a certain position within a display, controls such as software buttons within the dialog box should appear in fixed relation to the dialog box. Thus, if the user drags the dialog box within the display, the buttons within the dialog box will follow the dialog box so that they always have the same relative position with respect to the dialog box that contains them. To display such objects, the computer begins with the object that is lowest in the hierarchy, in this example, the dialog box, and draws objects at successive levels up to the highest object within the hierarchy. In this example, the highest level objects are the two controls. If an object at a particular level of the hierarchy is overlapped by one at a higher level, the computer overwrites the display data for the lower level with that of the higher level for the region in which the two objects overlap. The computer""s processor outputs the display data to a monitor or the like to generate the display of such objects on the computer.
Therefore, in previous technologies, generation of displays having overlapping objects involves considerable use of the processing power of the computer""s microprocessor to generate data that is not used in the overlapping regions of objects. More specifically, the microprocessor redundantly generates display data for objects in regions overlapped by other objects at higher levels within the hierarchy. It would be desirable to eliminate redundant generation of the display data for such objects to correspondingly reduce the as amount of processing power required to generate such display data. The elimination of redundant display data could lead to significant savings in terms of processing time required of the computing device to generate the display, as well as the memory size required for the display data. To illustrate the magnitude of the problem in more concrete terms, the display size for the video graphics array (VGA) standard common for many monitors and flat-panel displays are six-hundred-forty (640) by four-hundred eighty (480) picture objects (xe2x80x9cpixelsxe2x80x9d). For super VGA (SVGA) the size is one-thousand twenty-four (1,024) by seven-hundred sixty-eight (768) pixels. Because variables such as color and intensity for each pixel can be expressed by as many as twenty-four (24) or more bits, it will be appreciated that the amount of data used to generate an image on a display can be on the order of millions or tens of millions of data bits or more for a single image. If significant amounts of useless data for a display must be generated by a computer, the processing burden may become overwhelming, resulting in degradation of the display. Such degradation can be manifested in terms of slow response by the computer to software events that change the display, or the skipping of objects moving relative to other objects in the display in a hesitating, unnatural manner. It would be desirable to overcome these shortcomings of previous technologies.
Another problem related to the invention pertains to the so-called xe2x80x9cgarbage collectorxe2x80x9d or equivalent module present in JAVA and many other types of application development software. The garbage collector basically functions to clear a computing device""s memory of data not referenced by program code. When it is launched and operating, the garbage collector consumes a significant amount of the computing device""s processing power. This can be a significant disadvantage, particularly in graphics applications in which data processing demands are relatively intensive. In addition, the garbage collector can in some circumstances clear data that is needed by the computing device, and thus slow down the computing device by requiring it to regenerate data that was already available before the garbage collector cleared such data. It would be desirable to overcome these disadvantages of the garbage collector.
The apparatus, methods and articles of the invention have as their objects to overcome the disadvantages of previous technologies as noted hereinabove, and do in fact overcome such disadvantages to achieve significant benefits over previous technologies.
A first method is performed by a computing device. The first method comprises dividing a visible portion of at least one of a plurality of overlapping objects that has changed from a previous to current update cycle into at least one rect object. In dividing the changed visible portion, the computing device uses a graphical hierarchy defining precedence for display of the objects. By determining changed areas of the display, the computing device can be programmed to avoid using processing power on portions of the display that have not changed from a previous to current update cycle. In addition, the computing device can determine the portions of the display requiring update relatively rapidly through use of the rect object(s). The method can comprise determining whether the rect object is obstructed by an overlapping object at a higher level of the hierarchy. If rect object is obstructed by the overlapping object, the method can comprise dividing the rect object into at least one additional rect object. The method can use the rect object to generate a display. The generation of rect object(s) can involve calling a GetRect method of a RectHandler module of the application program. The GetRect method can be used to retrieve or create a rect object from the RectHandler module""s data store to set its property values to indicate the rect object""s position and size in the display. The computing device can maintain the relationship between the rect object and the object of which it is a part through use of a tree with pointers establishing relationship between an object and its child rect objects that are a part thereof. Upon calling a display module to display the rect object(s), the computing device can supply the rect object as well as the object identity from which the rect object is derived. Such object identity can be determined by virtue of the tree relationship. Accordingly, the display module of the application program can generate the display of the rect object on the computing device""s monitor. After display, the computing device can be programmed to clear the tree or tree branch associated with the rect object to free the computing device""s memory of data no longer needed for the display in the current update cycle. A DeliverRect method of the RectHandler module can be called by the application program""s update module to store the rect object in the RectHandler module""s data store. Although the values of the rect object are not reused, its format can be maintained so that the computing device need not regenerate a rect object template or shell upon calling the GetRect method in a subsequent update cycle.
A second method of the invention comprises executing with the computing device an application program for displaying at least first and second objects. The method comprises updating properties including, but not limited to, position and/or size of the first and second objects, based on the execution of the application program. The method comprises parsing the first and second objects to determine whether at least one of the position and size of the first and second objects has changed from the previous to current update cycle. If at least one of the first and second objects has changed from the previous to current update cycle, the method comprises determining at least whether the first and second objects partially overlap. Such determination can be made based on a hierarchy of the first and second objects defined by execution of the application program. The method comprises generating at least one rect object for at least one visible portion of the first and second objects that has changed from the previous to current update cycle. The method further comprises generating display data for the rect object with the computing device, and generating a display on the computing device, based on the display data. The dividing can be performed by projecting at least one edge of the overlapped one of the first and second objects to an edge of the overlapping one of the first and second objects to divide the overlapped object to form at least one rect object. In addition, if the visible portion(s) resulting from division of the changed portion(s) of the display are overlapped by another object(s), such visible portion(s) can again be broken down into smaller rect objects. To accomplish this task, the computing device can determine whether the visible portion is obstructed by an overlapping object. If so, the computing device can project a side edge of the overlapping object to the predetermined boundary to generate the rect object(s). The computing device can generate the display based on the rect object. The generation of the rect objects can be performed by the computing device by calling a GetRect method of a Rect Handler software module of the application program. The GetRect method can either retrieve or create a rect object with value fields associated with properties to indicate at least the position and size of the rect object. After the computing device uses the rect object to generate display data, the computing device can call the DeliverRect method to store the rect object in a data store of the Rect Handler software module for reuse in a subsequent update cycle. The DeliverRect method creates a pointer reference to the rect object so that a garbage collector module associated with the application program does not clear the rect object from the memory of the computing device. The application program can be repeated successively from the lowest to highest object of the display according to the hierarchy defined by the application program.
An apparatus of the invention comprises at least one memory, a processor, and a display unit. The memory stores an application program executable by the processor. The processor is coupled to the memory, and executes the application program to non-redundantly generate display data based on a graphical hierarchy of objects defined by the application program. The processor executes the application program to determine whether any visible objects have changed from a previous to current update cycle. If so, the processor determines whether a changed one of the objects is partially overlapped by another object at a higher level of a graphical hierarchy of objects. If so, the processor divides the overlapped, changed object to generate at least one rect object representing visible rectangular portions of the display. The processor generates display data based on the rect object. The display unit is coupled to the processor, and generates a display based on the display data.
A first article of manufacture of the invention comprises a data storage medium for use with a computing device. The data storage medium stores an application program executable by the computing device to determine whether any visible objects defined by the application program have changed from a previous to current update cycle. If one or more visible objects have changed, the computing device executes the application program to determine whether a changed one of the objects is partially overlapped by another object at a higher level of a graphical hierarchy of objects defined by the application program. If the changed object is overlapped by such other object, the computing device executes the application program to divide the overlapped, changed object into rect objects representing visible rectangular portions thereof. The computing device can further execute the application program to generate display data for display by the computing device, based on the rect object.
A second article of manufacture comprises a data storage medium for storing an application program executable by a computing device. The second article includes a data storage medium for storing an application program. The application program is executable by the computing device to divide a visible portion of at least one of a plurality of overlapping objects that has changed from a previous to current update cycle into at least one rect object. The application program can be executed to define a graphical hierarchy defining precedence for display of the objects that the computing device can use to generate the rect objects.